﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CNotebook;

namespace NotebookS2.Configuration.Master_Files.General
{
    public partial class M_SALESAGENT_LIST : Form
    {
        public M_SALESAGENT_LIST()
        {
            InitializeComponent();
        }

        public string ConnectionString { get; set; }

        public void PrintPreview()
        {
            gridControl1.ShowPrintPreview();
        }

        private void M_SALESAGENT_Load(object sender, EventArgs e)
        {
            AccountManager oManager = new AccountManager();
            DataTable dt = new DataTable();

            oManager.ConnectionString = this.ConnectionString;
            oManager.Open();

            dt = oManager.GetAccounts("Salesman");

            gridControl1.DataSource = dt;
            gridControl1.Refresh();
            
        }
    }
}
